import request from "@/utils/request";
//查询是否有重复 任务名称
export function nameCheck(name) {
  return request({
    url: "/v1/container-task/nameCheck/"+name,
    method: "get"
  });
}



// 容器镜像（容器文件）分页查询
export function containerPage(data) {
  return request({
    url: "/v1/container-task/containerMirroringPage",
    method: "get",
    params: data
  });
}

// 确认安装信息
export function containerSave(data) {
  return request({
    url: "/v1/container-task/save",
    method: "POST",
    data: data
  });
}

export function getById(id) {
  return request({
    url: "/v1/container-task/get/" + id,
    method: "get"
  });
}

// 容器卸载
export function uninstallById(id) {
  return request({
    url: "/v1/container-task/uninstall/" + id,
    method: "get"
  });
}

// 容器卸载
export function downloadById(id) {
  return request({
    url: "/v1/container-task/download/" + id,
    method: "get"
  });
}

// 容器安装
export function installById(id) {
  return request({
    url: "/v1/container-task/install/" + id,
    method: "get"
  });
}

// 容器启动
export function startById(id) {
  return request({
    url: "/v1/container-task/start/" + id,
    method: "get"
  });
}

// 分页查询
export function getList(data) {
  return request({
    url: "/v1/container-task/page",
    method: "get",
    params: data
  });
}

// 容器删除
export function deleteById(id) {
  return request({
    url: "/v1/container-task/delete/" + id,
    method: "get"
  });
}
